Raw RGB
This is the simplest possible format for storing RGB (also called “direct color”) type pictures (where the red, green, and blue values are stored for each pixel).  

It contains the picture width, height and the uncompressed image.

Input & Output:  256, 32768, 17 million colors, or 17 million colors + alpha channel.

Default Extension:  RGB

Technical Details
The first 8 bytes are Ascii for “RAW RGB “ [hex 52 41 57 20 52 47 42 20].

2 Motorola bytes for the width in pixels [for example decimal width 320:  hex 01 40].

2 Motorola bytes for the height in pixels. 

The uncompressed image, in one of 3 forms. The form may be determined by dividing the total file size by the width * height:

4 bytes/pixel: 1 byte alpha channel, 1 byte red, 1 byte green, 1 byte blue

- or - 

3 bytes/pixel: 1 byte red, 1 byte green, and 1 byte blue

- or -

2 bytes/pixel: 1 junk bit, 5 bits red, 5 bits green, 5 bits blue, reading from left to right or high bit to low bit.